#include "stdafx.h"
#include "TestIDGenerator.h"
#include "UeObjectId.h"

CPPUNIT_TEST_SUITE_REGISTRATION( TestIDGenerator );


TestIDGenerator::TestIDGenerator()
{
}


TestIDGenerator::~TestIDGenerator()
{
}

void TestIDGenerator::TestGenerate()
{
	IDGenerator gen( 34, 5 );

	UeObjectId id = gen.Generate();

	CPPUNIT_ASSERT( id.EnviromentID() == 34 );
	CPPUNIT_ASSERT( id.ObjectID() == 6 );

	id = gen.Generate();
	CPPUNIT_ASSERT( id.EnviromentID() == 34 );
	CPPUNIT_ASSERT( id.ObjectID() == 7 );
}